package org.eenie.cartoonist.components.retrofit;

import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.charset.Charset;

import okhttp3.ResponseBody;
import retrofit2.Converter;

/**
 * Created by sll on 2016/3/31.
 * 将服务器数据转换成Json
 *
 */
public class OrivonResponseBodyConverter<T> implements Converter<ResponseBody, T> {

    private Type type;
    private Charset charset;

    public OrivonResponseBodyConverter() {

    }

    public OrivonResponseBodyConverter(Type type, Charset charset) {
        this.type = type;
        this.charset = charset;
    }

    @Override
    public T convert(ResponseBody value) throws IOException {





//        try {
//            return JSON.parseObject(value.string(), type);
//        } finally {
//            value.close();
//        }


        return null;

    }
}
